<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Ananas Library: Класс aLog</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Создано системой Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Титульная&nbsp;страница</span></a></li>
      <li class="current"><a href="annotated.html"><span>Классы</span></a></li>
      <li><a href="files.html"><span>Файлы</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Классы</span></a></li>
      <li><a href="hierarchy.html"><span>Иерархия&nbsp;классов</span></a></li>
      <li><a href="functions.html"><span>Члены&nbsp;классов</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>Класс aLog</h1><!-- doxytag: class="aLog" -->Класс содержит статические функции для записи сообщений в лог файл Ананаса.  
<a href="#_details">Подробнее...</a>
<p>
<code>#include &lt;<a class="el" href="alog_8h-source.html">alog.h</a>&gt;</code>
<p>

<p>
<a href="classaLog-members.html">Полный список членов класса</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Открытые типы</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><b>MessageType</b> { <b>MT_ERROR</b>, 
<b>MT_INFO</b>, 
<b>MT_DEBUG</b>
 }</td></tr>

<tr><td colspan="2"><br><h2>Открытые статические члены</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaLog.html#603ee5203afd91ef3289e8d3ecd0b01d">print</a> (int status, const QString &amp;text)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaLog.html#aafb62dbda5d90d34c260325f7b39489">printr</a> (const QString &amp;text)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classaLog.html#d7b5ccce835bf42da7d7835b9cad81cb">init</a> (const QString &amp;logname=&quot;&quot;, int loglevel=0)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5c1aa0a78a7bcf57e9d6e59492f0abbf"></a><!-- doxytag: member="aLog::close" ref="5c1aa0a78a7bcf57e9d6e59492f0abbf" args="()" -->
static void&nbsp;</td><td class="memItemRight" valign="bottom"><b>close</b> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="51d4f54ab59cd3478c460840ec7e3bb3"></a><!-- doxytag: member="aLog::getLogName" ref="51d4f54ab59cd3478c460840ec7e3bb3" args="()" -->
static QString&nbsp;</td><td class="memItemRight" valign="bottom"><b>getLogName</b> ()</td></tr>

</table>
<hr><a name="_details"></a><h2>Подробное описание</h2>
Класс содержит статические функции для записи сообщений в лог файл Ананаса. <hr><h2>Методы</h2>
<a class="anchor" name="603ee5203afd91ef3289e8d3ecd0b01d"></a><!-- doxytag: member="aLog::print" ref="603ee5203afd91ef3289e8d3ecd0b01d" args="(int status, const QString &amp;text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void aLog::print           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>status</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>text</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Сообщение об ошибке<p>
Информационное сообщение<p>
Отладочное сообщение<p>
Пишет текст в лог, если статус сообщения меньше установленного при инициализации. К тексту добавляется дата и статус. <dl compact><dt><b>Аргументы:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>- статус сообщения ( aLog::MT_ERROR, aLog::MT_INFO, aLog::MT_DEBUG ). </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>- сообщение </td></tr>
  </table>
</dl>

<p>Перекрестные ссылки <a class="el" href="alog_8cpp-source.html#l00101">printr()</a>.</p>

<p>Используется в <a class="el" href="acontainer_8cpp-source.html#l00279">aContainer::addFile()</a>, <a class="el" href="wdbtable_8cpp-source.html#l00873">wDBTable::checkFields()</a>, <a class="el" href="acontainer_8cpp-source.html#l00547">aContainer::cleanupTmpFiles()</a>, <a class="el" href="aform_8cpp-source.html#l00450">aForm::close()</a>, <a class="el" href="aform_8cpp-source.html#l00421">aForm::Close()</a>, <a class="el" href="aform_8cpp-source.html#l01163">aForm::ColIndex()</a>, <a class="el" href="acontainer_8cpp-source.html#l00458">aContainer::compressFile()</a>, <a class="el" href="adocument_8cpp-source.html#l01277">aDocument::Conduct()</a>, <a class="el" href="engine_8cpp-source.html#l00114">aObjectsFactory::create()</a>, <a class="el" href="wdbtable_8cpp-source.html#l01133">aEditorFactory::createEditor()</a>, <a class="el" href="acontainer_8cpp-source.html#l00195">aContainer::createTmpDir()</a>, <a class="el" href="aext__meta_8cpp-source.html#l00203">AExtMeta::DataTypes()</a>, <a class="el" href="aform_8cpp-source.html#l00829">aForm::DBValue()</a>, <a class="el" href="acatalogue_8cpp-source.html#l00659">aCatalogue::delElement()</a>, <a class="el" href="adocument_8cpp-source.html#l00423">aDocument::Delete()</a>, <a class="el" href="acatalogue_8cpp-source.html#l00251">aCatalogue::Delete()</a>, <a class="el" href="airegister_8cpp-source.html#l00317">aIRegister::deleteDocument()</a>, <a class="el" href="adocjournal_8cpp-source.html#l00241">aDocJournal::deleteDocument()</a>, <a class="el" href="aaregister_8cpp-source.html#l00235">aARegister::deleteDocument()</a>, <a class="el" href="airegister_8cpp-source.html#l00361">aIRegister::deleteTable()</a>, <a class="el" href="acatalogue_8cpp-source.html#l00760">aCatalogue::delGroup()</a>, <a class="el" href="aform_8cpp-source.html#l01229">aForm::done()</a>, <a class="el" href="acontainer_8cpp-source.html#l00398">aContainer::extractData()</a>, <a class="el" href="acontainer_8cpp-source.html#l00333">aContainer::extractManifest()</a>, <a class="el" href="wfield_8cpp-source.html#l00477">wField::fieldSelect()</a>, <a class="el" href="acfg_8cpp-source.html#l00586">aCfg::find()</a>, <a class="el" href="adocjournal_8cpp-source.html#l00564">aDocJournal::findDoc()</a>, <a class="el" href="adocjournal_8cpp-source.html#l00528">aDocJournal::findDocument()</a>, <a class="el" href="adocument_8cpp-source.html#l01468">aDocument::GetDocumentValue()</a>, <a class="el" href="areport_8cpp-source.html#l00679">aReport::getName4NewTemplate()</a>, <a class="el" href="aaregister_8cpp-source.html#l00275">aARegister::getSaldo()</a>, <a class="el" href="aaregister_8cpp-source.html#l00369">aARegister::getSaldoByManyDimensions()</a>, <a class="el" href="aootemplate_8cpp-source.html#l00186">aOOTemplate::getValue()</a>, <a class="el" href="amsotemplate_8cpp-source.html#l00090">aMSOTemplate::getValue()</a>, <a class="el" href="wdbtable_8cpp-source.html#l00929">wDBTable::init()</a>, <a class="el" href="aform_8cpp-source.html#l00229">aForm::init()</a>, <a class="el" href="adatabase_8cpp-source.html#l00180">aDatabase::init()</a>, <a class="el" href="wjournal_8cpp-source.html#l00064">wJournal::initObject()</a>, <a class="el" href="awidget_8cpp-source.html#l00187">aWidget::initObject()</a>, <a class="el" href="aobject_8cpp-source.html#l00170">aObject::initObject()</a>, <a class="el" href="adocjournal_8cpp-source.html#l00107">aDocJournal::initObject()</a>, <a class="el" href="aaregister_8cpp-source.html#l00111">aARegister::initObject()</a>, <a class="el" href="acalctemplate_8cpp-source.html#l00124">aCalcTemplate::insertTagsValues()</a>, <a class="el" href="adocument_8cpp-source.html#l01355">aDocument::IsConducted()</a>, <a class="el" href="wdbtable_8cpp-source.html#l01336">wDBTable::keyPressEvent()</a>, <a class="el" href="aootemplate_8cpp-source.html#l00657">aOOTemplate::lineFeedRemove()</a>, <a class="el" href="acfg_8cpp-source.html#l01079">aCfg::loadOneObject()</a>, <a class="el" href="wdocument_8cpp-source.html#l00287">wDocument::New()</a>, <a class="el" href="awidget_8cpp-source.html#l00642">aWidget::New()</a>, <a class="el" href="adocument_8cpp-source.html#l00313">aDocument::New()</a>, <a class="el" href="adocjournal_8cpp-source.html#l00285">aDocJournal::New()</a>, <a class="el" href="acatalogue_8cpp-source.html#l01167">aCatGroup::New()</a>, <a class="el" href="acatalogue_8cpp-source.html#l00558">aCatalogue::newGroup()</a>, <a class="el" href="adocjournal_8cpp-source.html#l00380">aDocJournal::nextNumber()</a>, <a class="el" href="atemplate_8cpp-source.html#l00055">aTemplate::open()</a>, <a class="el" href="aootemplate_8cpp-source.html#l00064">aOOTemplate::open()</a>, <a class="el" href="amsotemplate_8cpp-source.html#l00029">aMSOTemplate::open()</a>, <a class="el" href="acontainer_8cpp-source.html#l00112">aContainer::open()</a>, <a class="el" href="engine_8cpp-source.html#l00661">aEngine::openForm()</a>, <a class="el" href="areport_8cpp-source.html#l00631">aReport::path2workdir()</a>, <a class="el" href="adatabase_8cpp-source.html#l00235">aDatabase::prepareDatabaseConnect()</a>, <a class="el" href="atests_8cpp-source.html#l00089">aTests::readConfig()</a>, <a class="el" href="atemplate_8cpp-source.html#l00170">aTemplate::save()</a>, <a class="el" href="areport_8cpp-source.html#l00717">aReport::save()</a>, <a class="el" href="aootemplate_8cpp-source.html#l00554">aOOTemplate::save()</a>, <a class="el" href="amsotemplate_8cpp-source.html#l00491">aMSOTemplate::save()</a>, <a class="el" href="acontainer_8cpp-source.html#l00223">aContainer::save()</a>, <a class="el" href="acfg_8cpp-source.html#l01041">aCfg::saveOneObject()</a>, <a class="el" href="awidget_8cpp-source.html#l00665">aWidget::Select()</a>, <a class="el" href="airegister_8cpp-source.html#l00402">aIRegister::Select()</a>, <a class="el" href="adocjournal_8cpp-source.html#l00697">aDocJournal::Select()</a>, <a class="el" href="acatalogue_8cpp-source.html#l00325">aCatalogue::Select()</a>, <a class="el" href="aform_8cpp-source.html#l01722">aForm::SelectByCurrent()</a>, <a class="el" href="aform_8cpp-source.html#l00950">aForm::SetColumnReadOnly()</a>, <a class="el" href="atemplate_8cpp-source.html#l00199">aTemplate::setDir()</a>, <a class="el" href="aform_8cpp-source.html#l01239">aForm::setfocus()</a>, <a class="el" href="asqltable_8cpp-source.html#l00152">aDataTable::setObject()</a>, <a class="el" href="awidget_8cpp-source.html#l00902">aWidget::setObjValue()</a>, <a class="el" href="aform_8cpp-source.html#l01615">aForm::SetReadOnly()</a>, <a class="el" href="aform_8cpp-source.html#l01193">aForm::SetTabValue()</a>, <a class="el" href="acfg_8cpp-source.html#l01166">aCfg::setupNewId()</a>, <a class="el" href="awidget_8cpp-source.html#l00838">aWidget::setValue()</a>, <a class="el" href="areport_8cpp-source.html#l00419">aReport::show()</a>, <a class="el" href="aform_8cpp-source.html#l00402">aForm::show()</a>, <a class="el" href="aform_8cpp-source.html#l00477">aForm::SignIn()</a>, <a class="el" href="adocument_8cpp-source.html#l01323">aDocument::SignOut()</a>, <a class="el" href="acfg_8cpp-source.html#l00698">aCfg::swap()</a>, <a class="el" href="aform_8cpp-source.html#l00983">aForm::TabCount()</a>, <a class="el" href="aobject_8cpp-source.html#l00211">aObject::table()</a>, <a class="el" href="adocument_8cpp-source.html#l00465">aDocument::TableDelete()</a>, <a class="el" href="aobject_8cpp-source.html#l00240">aObject::tableInsert()</a>, <a class="el" href="adocument_8cpp-source.html#l00369">aDocument::TableNewLine()</a>, <a class="el" href="aobject_8cpp-source.html#l00286">aObject::tableRemove()</a>, <a class="el" href="aobject_8cpp-source.html#l01050">aObject::TableUpdate()</a>, <a class="el" href="adocument_8cpp-source.html#l00596">aDocument::TableUpdate()</a>, <a class="el" href="aform_8cpp-source.html#l01016">aForm::TabNewLine()</a>, <a class="el" href="aform_8cpp-source.html#l00502">aForm::turn_off()</a>, <a class="el" href="aform_8cpp-source.html#l00459">aForm::turn_on()</a>, <a class="el" href="awidget_8cpp-source.html#l00443">aWidget::uid()</a>, <a class="el" href="adatabase_8cpp-source.html#l00539">aDatabase::uid()</a>, <a class="el" href="adatabase_8cpp-source.html#l00583">aDatabase::uidType()</a>, <a class="el" href="adocument_8cpp-source.html#l01306">aDocument::UnConduct()</a>, <a class="el" href="awidget_8cpp-source.html#l00689">aWidget::Update()</a>, <a class="el" href="aform_8cpp-source.html#l00526">aForm::update()</a>, <a class="el" href="adocument_8cpp-source.html#l00558">aDocument::Update()</a>, <a class="el" href="acatalogue_8cpp-source.html#l00275">aCatalogue::Update()</a>, <a class="el" href="aaregister_8cpp-source.html#l00211">aARegister::Update()</a>, <a class="el" href="wdbtable_8cpp-source.html#l01254">wDBTable::Value()</a>, <a class="el" href="awidget_8cpp-source.html#l00779">aWidget::value()</a>, <a class="el" href="asqltable_8cpp-source.html#l00435">aDataTable::value()</a>, <a class="el" href="wdbtable_8cpp-source.html#l00053">wDBTable::wDBTable()</a> и <a class="el" href="atests_8cpp-source.html#l00140">aTests::writeConfig()</a>.</p>

</div>
</div><p>
<a class="anchor" name="aafb62dbda5d90d34c260325f7b39489"></a><!-- doxytag: member="aLog::printr" ref="aafb62dbda5d90d34c260325f7b39489" args="(const QString &amp;text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void aLog::printr           </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>toWrite</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Пишет текст в лог без изменения.<p>
<dl compact><dt><b>Аргументы:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>- текст </td></tr>
  </table>
</dl>

<p>Используется в <a class="el" href="alog_8cpp-source.html#l00058">print()</a>.</p>

</div>
</div><p>
<a class="anchor" name="d7b5ccce835bf42da7d7835b9cad81cb"></a><!-- doxytag: member="aLog::init" ref="d7b5ccce835bf42da7d7835b9cad81cb" args="(const QString &amp;logname=&quot;&quot;, int loglevel=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void aLog::init           </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>log_name</em> = <code>&quot;&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>show_up</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Инициализирует систему логирования. Выполняется один раз при запуске програмы, если параметры не указаны, осуществляется попытка прочитать из из конфигурационного файла. Если это не удается, используются параметры по умолчанию.<p>
<dl compact><dt><b>Аргументы:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>log_name</em>&nbsp;</td><td>- Путь к логу. Значение по умолчанию ~/.ananas/ananas.log </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>- статус скрытия сообщений. Все сообщения, имеющие больший статус, не попадут в лог ( ERROR= 0, INFO= 1, DEBUG= 2 ). Значение по умолчанию DEBUG </td></tr>
  </table>
</dl>

<p>Перекрестные ссылки <a class="el" href="aservice_8cpp-source.html#l00448">aService::readConfigVariable()</a>.</p>

</div>
</div><p>
<hr>Объявления и описания членов классов находятся в файлах:<ul>
<li><a class="el" href="alog_8h-source.html">alog.h</a><li>alog.cpp</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Документация по Ananas Library. Последние изменения: Sun Feb 1 21:47:15 2009. Создано системой&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>
